home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 July / Chip_1998-07_cd.bin / zkuste / mazda / Sedan311.dxr / Internal_18_Go to Marker - MouseEnter, MouseLeave.ls < prev    next >
Encoding:
Text File  |  1998-05-12  |  2.0 KB  |  71 lines

  1. property whichevent, WhichLabel, playMode
  2.  
  3. on initGotoMarker me
  4.   init(me)
  5. end
  6.  
  7. on mouseUp me
  8.   if whichevent = #mouseUp then
  9.     init(me)
  10.   end if
  11. end
  12.  
  13. on mouseEnter me
  14.   if whichevent = #mouseEnter then
  15.     init(me)
  16.   end if
  17. end
  18.  
  19. on mouseLeave me
  20.   if whichevent = #mouseLeave then
  21.     init(me)
  22.   end if
  23. end
  24.  
  25. on prepareFrame me
  26.   if whichevent = #prepareFrame then
  27.     init(me)
  28.   end if
  29. end
  30.  
  31. on exitFrame me
  32.   if whichevent = #exitFrame then
  33.     init(me)
  34.   end if
  35. end
  36.  
  37. on init me
  38.   if the playMode of me = "Go to" then
  39.     case WhichLabel of
  40.       #previous:
  41.         go(marker(-1))
  42.       #loop:
  43.         go(marker(0))
  44.       #next:
  45.         go(marker(1))
  46.       otherwise:
  47.         go(WhichLabel)
  48.     end case
  49.   else
  50.     case WhichLabel of
  51.       #previous:
  52.         play frame marker(-1)
  53.       #loop:
  54.         play frame marker(0)
  55.       #next:
  56.         play frame marker(1)
  57.       otherwise:
  58.         play frame WhichLabel
  59.     end case
  60.   end if
  61. end
  62.  
  63. on getPropertyDescriptionList
  64.   set p_list to [#WhichLabel: [#comment: "Destination Marker:", #format: #marker, #default: "#Loop"], #whichevent: [#comment: "Initializing Event:", #format: #symbol, #range: [#mouseUp, #mouseEnter, #mouseLeave, #prepareFrame, #exitFrame, #initGotoMarker], #default: #mouseUp], #playMode: [#comment: "Play Mode:", #format: #symbol, #range: ["Go to", "Play and Return"], #default: "Go to"]]
  65.   return p_list
  66. end
  67.  
  68. on getBehaviorDescription
  69.   return "Moves the Playback Head to a designated marker when the specified event occurs.  Drag to a sprite or a frame in the script channel." && RETURN & "PARAMETERS:" && RETURN & "ΓÇó Destination Marker - Choose from a list of all marker names in the current movie or choose Previous, Loop (Current), or Next." && RETURN & "ΓÇó Initializing Event - Specify the event that triggers the behavior." & RETURN & "ΓÇó Play Mode - Choose Play and Return to make the Playback Head return to the current location when the Play Done behavior is encountered. Choose Go To to make the Playback Head continue from the specified frame until explicitly sent to a new location."
  70. end
  71.